package com.handinglian.ai.record.service.impl;

import com.handinglian.ai.record.entity.FileInfo;
import com.handinglian.ai.record.mapper.FileInfoMapper;
import com.handinglian.ai.record.service.FileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("fileInfoService")
public class FileInfoServiceImpl implements FileInfoService {
    @Autowired
    private FileInfoMapper fileInfoMapper;

    @Override
    @Transactional
    public int create(FileInfo fileInfo) {
        return fileInfoMapper.insertSelective(fileInfo);
    }

    @Override
    public FileInfo get(String fileUuid) {
        return fileInfoMapper.selectByPrimaryKey(fileUuid);
    }

    @Override
    public List<FileInfo> list(List<String> fileUuids) {
        return fileInfoMapper.findByUuidIn(fileUuids);
    }
}
